﻿@model Himall.Model.VShopInfo
@using Himall.Core;

<meta property="wb:webmaster" content="13b21966c78f011e" />
<script src="http://tjs.sjs.sinajs.cn/open/api/js/wb.js" type="text/javascript" charset="utf-8"></script>
<div class="container">
    <ul class="nav nav-tabs-custom clearfix">
        <strong>微店</strong>
        <li class="active"><a>微店</a></li>
        
        @if (Model != null)
        {
            <li><a href="editvshop?shopId=@Model.ShopId" id="btnUpd">店铺信息管理</a></li>
            @*<li><a href="VshopHomeSite">店铺首页配置</a></li>*@
        }
    </ul>

    @if (Model == null)
    {
		<div class="form-horizontal">
			<div class="form-group">
				<p class="apply-primary"><span class="glyphicon glyphicon-info-sign"></span>您还未开设自己的微店，<a href="EditVShop?shopId=@ViewBag.ShopId">现在开设</a></p>
			</div>
		</div>
    }
    else
    {
        <div class="form-horizontal">
            <div class="form-group">
                <label class="col-sm-2 control-label" for="">店铺名称:</label>
                <div class="col-sm-3 form-control-static">@Model.Name</div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label" for="">当前状态:</label>
                <div class="col-sm-3 form-control-static">@Model.State.ToDescription()</div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label" for="">创建时间:</label>
                <div class="col-sm-3 form-control-static">@Model.CreateTime.ToString("yyyy-MM-dd")</div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label" for="">浏览数:</label>
                <div class="col-sm-3 form-control-static">@Model.VisitNum</div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label" for="">购买数:</label>
                <div class="col-sm-3 form-control-static">@Model.buyNum</div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label" for="">店铺二维码:</label>
                <div class="col-sm-3"><img style="width: 150px;margin: -11px;" src="@ViewBag.QRCode" /></div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label" for="">微店预览:</label>
                <div class="col-sm-3 form-control-static"><a class="glyphicon glyphicon-eye-open view-mobile-shop" title="预览微店" style="font-size:18px;text-decoration: none; cursor:pointer;"></a></div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label" for="">分享:</label>
                <div class="col-sm-1 form-control-static">
                    <wb:share-button type="button" count="n" addition="simple" title="这家店铺很不错哦" pic="http://@Request.Url.Host@ViewBag.QRCode" url="http://@Request.Url.Host/shop/home/@Model.ShopId"></wb:share-button>
                </div>
                <div class="col-sm-1 form-control-static">
                    <script type="text/javascript">
                        (function () {
                            var p = {
                                url: 'http://@Request.Url.Host/shop/home/@Model.ShopId',
                                showcount: '0',/*是否显示分享总数,显示：'1'，不显示：'0' */
                                desc: '',/*默认分享理由(可选)*/
                                summary: '',/*分享摘要(可选)*/
                                title: '这家店铺很不错哦',/*分享标题(可选)*/
                                site: '',/*分享来源 如：腾讯网(可选)*/
                                pics: 'http://@Request.Url.Host@ViewBag.QRCode', /*分享图片的路径(可选)*/
                                style: '102',
                                width: 88,
                                height: 30
                            };
                            var s = [];
                            for (var i in p) {
                                s.push(i + '=' + encodeURIComponent(p[i] || ''));
                            }
                            document.write(['<a version="1.0" class="qzOpenerDiv" href="http://sns.qzone.qq.com/cgi-bin/qzshare/cgi_qzshare_onekey?', s.join('&'), '" target="_blank">分享</a>'].join(''));
                        })();
                    </script>
                    <script src="http://qzonestyle.gtimg.cn/qzone/app/qzlike/qzopensl.js#jsdate=20111201" charset="utf-8"></script>
                </div>

            </div>
            @*<div class="form-group">
                <div class="col-sm-2 col-sm-offset-1"><a class="btn btn-primary btn-sm" href="editvshop?shopId=@Model.ShopId">编辑店铺信息</a></div>

            </div>*@
        </div>
    }

</div>
@if (Model != null)
{
    <div class="mobile-dialog">
        <iframe name="mobile-iframe" frameborder="0" scrolling="auto" src="@Url.Action("detail", "vshop", new { Area = "Mobile", id = Model.Id,sv=true })"></iframe>
    </div>
}
<div class="cover"></div>
<script type="text/javascript">
	$('.view-mobile-shop').click(function() {

		$('.mobile-dialog').show();
		$('.cover').fadeIn();
		//document.frames['mobile-iframe'].location.reload();
		window.frames['mobile-iframe'].location.reload()
	});
	$('.cover').click(function() {
		$('.mobile-dialog').hide();
		$('.cover').fadeOut();
	});
</script>


<script src="http://qzonestyle.gtimg.cn/qzone/app/qzlike/qzopensl.js#jsdate=20111201" charset="utf-8"></script>